home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)aax.d64
/
ss-3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
126 lines
1 REM FROM COMPUTE GAZETTE APRIL 84
3 SYS65517:A=PEEK(781):IFA=40THENPOKE53281,1
5 OPEN1,4:DIMW4(3):GOSUB1510:I=1:J=2
7 PRINT#1,CHR$(14)" CALENDAR FOR";Y:PRINT#1:PRINT#1,CHR$(15)
10 PRINT#1,CHR$(14)SPC(8)"JANUARY"SPC(13)"FEBRUARY
12 [141]1009:[141]1000:[141]1012:C0[178]6:[141]1019:[141]1000:[141]1022
15 M0[178]I:M8[178]1:[141]292:[141]20:[137]35
20 D[178]1:[141]1050:W2[178]8[171]D1:W4(M8)[178]W2[170]1:[141]321
22 [139]D1[178]7[167][137]30
25 [129]D[178]2[164]W2:[141]1050:[141]331:[130]
30 [142]
35 [141]990:M0[178]J:M8[178]2:[141]292:[141]20
44 W3[178]1
45 M0[178]I:M8[178]1:[141]292:[141]200
46 [139]W4(2)[178]9[167][152]1,[199](15)[166]1);
50 [141]991:M0[178]J:M8[178]2:[141]292:[141]200
56 [139]W3[178]1[175]W4(1)[177]9[167][152]1,[199](15)[166]0);
57 [139]W3[178]1[175]W4(1)[179]10[167][152]1,[199](15)[166]1);
58 [139]W3[178]4[175]W4(2)[177]30[167][152]1,[199](15)[166]0);
65 W3[178]W3[170]1
70 [139]W3[179]C0[167][137]45
71 [152]1," "
72 [139]I[178]1[167][137]86
73 [139]I[178]3[167][137]96
74 [139]I[178]5[167][137]106
75 [139]I[178]7[167][137]116
76 [139]I[178]9[167][137]126
77 [139]I[178]11[167][137]199
86 [152]1,[199](14)[166]9)"MARCH"[166]16)"APRIL
88 I=3:J=4:GOTO12
96 PRINT#1,CHR$(14)SPC(10)"MAY"SPC(17)"JUNE
98 I[178]5:J[178]6:[137]12
106 [152]1,[199](14)[166]9)"JULY"[166]16)"AUGUST
108 I=7:J=8:GOTO12
116 PRINT#1,CHR$(14)SPC(7)"SEPTEMBER"SPC(13)"OCTOBER
118 I[178]9:J[178]10:[137]12
126 [152]1,[199](14)[166]7)"NOVEMBER"[166]13)"DECEMBER
128 I=11:J=12:GOTO12
199 PRINT#1,CHR$(15)SPC(1):CLOSE1:END
200 D4=W4(M8):D7=W4(M8)+6
205 D=D4:GOSUB1050
210 IFD1<>1THENPRINT"WHY D1=";D1
212 IFM8=1AND(D+1)<10THENGOSUB528
213 IFM8=1AND(D+1)>9THENGOSUB530
214 IFM8=2AND(D+1)<10THENGOSUB428
215 IFM8=2ANDD4>=30ANDD4<=E1THENGOSUB433:GOTO217
216 IFM8=2AND(D+1)>9THENGOSUB430
217 FORD=D4+1TOD7:GOSUB1050:GOSUB331:NEXT
220 W4(M8)=D7+1
225 RETURN
292 IFM0=1ORM0=3ORM0=5ORM0=7ORM0=8ORM0=10ORM0=12THENE1=31
293 IFM0=4ORM0=6ORM0=9ORM0=11THENE1=30
294 IFM0=2ANDY/4<>INT(Y/4)THENE1=28
295 IFM0=2ANDY/4=INT(Y/4)THENGOSUB1400
296 RETURN
321 IFD1=7THENPRINT#1,CHR$(15)SPC(36);D;:GOTO330
322 IFD1=6THENPRINT#1,CHR$(15)SPC(31);D;:GOTO330
323 IFD1=5THENPRINT#1,CHR$(15)SPC(26);D;:GOTO330
324 IFD1=4THENPRINT#1,CHR$(15)SPC(21);D;:GOTO330
325 IFD1=3THENPRINT#1,CHR$(15)SPC(16);D;:GOTO330
326 IFD1=2THENPRINT#1,CHR$(15)SPC(11);D;:GOTO330
327 IFD1=1THENPRINT#1,CHR$(15)SPC(6);D;:GOTO330
328 PRINT#1,CHR$(15)SPC(3);D;:GOTO330
329 PRINT#1,CHR$(15)SPC(2);D;
330 RETURN
331 IFD>E1THENPRINT#1,CHR$(15)SPC(5);:GOTO350
332 IFD1=1ANDD<=9THENPRINT#1,D;:GOTO350
333 IFD1=1ANDD>9THENPRINT#1,D;:GOTO350
335 IFD<=9THENPRINT#1,CHR$(15)SPC(2);D;:GOTO350
336 PRINT#1,CHR$(15)SPC(1);D;
350 RETURN
428 IFD>E1THENPRINT#1,CHR$(15)SPC(9);:GOTO435
429 GOTO328
430 IFD>E1THENPRINT#1,CHR$(15)SPC(9);:GOTO435
431 GOTO329
433 PRINT#1,CHR$(15)SPC(1);D;
435 RETURN
528 IFD>E1THENPRINT#1,CHR$(15)SPC(9);:GOTO535
529 GOTO532
530 IFD>E1THENPRINT#1,CHR$(15)SPC(9);:GOTO535
531 GOTO533
532 PRINT#1,CHR$(15)SPC(5);D;:GOTO535
533 PRINT#1,CHR$(15)SPC(4);D;
535 RETURN
990 PRINT#1,CHR$(15)SPC(3);:GOTO992
991 PRINT#1,CHR$(15)SPC(6);
992 RETURN
1000 PRINT#1,CHR$(15)SPC(7);
1001 RETURN
1009 PRINT#1,CHR$(15)SPC(3);
1010 PRINT#1," SUN MON TUE WED THU FRI SAT";
1011 RETURN
1012 PRINT#1," SUN MON TUE WED THU FRI SAT"
1013 RETURN
1019 PRINT#1,CHR$(15)SPC(3);
1020 PRINT#1," [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]";
1021 RETURN
1022 PRINT#1," [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
1023 RETURN
1050 IFM0=1THENM0=13:Y=Y-1:GOTO1080
1060 IFM0=2THENM0=14:Y=Y-1
1080 M=M0-2
1100 D1=INT(2.6*M-0.2)+D+Y-1900+INT((Y-1900)/4)
1150 D1=D1+INT(19/4)-2*19
1200 D1=D1-INT(D1/7)*7+1
1210 IFM0=4ORM0=9THEND1=D1+1
1230 IFM0=13THENM0=1:Y=Y+1:GOTO1250
1240 IFM0=14THENM0=2:Y=Y+1:D1=D1+1
1244 IFD1=8THEND1=1
1245 IF(Y=2100ANDM0>3)OR(Y>2100)THEND1=D1-1:IFD1=0THEND1=7
1247 IF(Y=2200ANDM0>3)OR(Y>2200)THEND1=D1-1:IFD1=0THEND1=7
1249 IF(Y=2300ANDM0>3)OR(Y>2300)THEND1=D1-1:IFD1=0THEND1=7
1250 RETURN
1400 IF(Y/100=INT(Y/100))AND(Y/400<>INT(Y/400))THENE1=28:GOTO1410
1405 E1=29
1410 RETURN
1510 PRINT"[147] THIS IS A PROGRAM":PRINT" TO SHOW A
1520 [153]" YEARLY CALENDAR.":[153]" ON THE PRINTER."
1530 [153]" PLEASE TYPE IN THE":[153]" YEAR THAT YOU":[153]" WANT TO SEE.
1531 PRINT" USE ALL 4 DIGITS.
1532 [133]"";Y
1570 [153]" THANK YOU. NOW TURN ON THE
1573 PRINT"PRINTER AND HIT A KEY.
1580 [161]J$:[139]J$[178]""[167]1580
1590 [142]